﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace WcfServiceTransLayer
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract]
    public interface MyWCFService
    {
        /*
        [OperationContract]
        string GetData(int value);
        */
        /*
        [OperationContract]
        CompositeType GetDataUsingDataContract(CompositeType composite);
        */

        // TODO: Add your service operations here
        [OperationContract]
        serviceTeam getServiceTeam(int index);

        /*
        [OperationContract]
        serviceUser getUser(serviceUser user);
        */

        [OperationContract]
        void createUserAccount(serviceUser user);

        [OperationContract]
        serviceUser login(serviceUser user);

        [OperationContract]
        void updateUserSelectedTeams(serviceUser user);


    }


    // Use a data contract as illustrated in the sample below to add composite types to service operations.
    /*
    [DataContract]
    public class CompositeType
    {
        bool boolValue = true;
        string stringValue = "Hello ";

        [DataMember]
        public bool BoolValue
        {
            get { return boolValue; }
            set { boolValue = value; }
        }

        [DataMember]
        public string StringValue
        {
            get { return stringValue; }
            set { stringValue = value; }
        }
    }
    */
 
    [DataContract]
    public class serviceTeam
    {
        string teamname = "";
        //string teamID;
        bool selected = false;
        //value representing which column the team will be assigned to in the UI
        //valid values are 0, 1, 2
        int column;
        int score0;
        int score1;
        int score2;
        int score3;
        int score4;
        int score5;
        int score6;
        int score7;
        int score8;
        int score9;
        int score10;
        int score11;
        int score12;
        int score13;
        int score14;
        int score15;
        int score16;

        [DataMember]
        public string teamName
        {
            get { return teamname; }
            set { teamname = value; }
        }
        
        [DataMember]
        public bool isSelected
        {
            get { return selected; }
            set { selected = value; }
        }

        /*
        [DataMember]
        public string teamId
        {
            get { return teamId; }
            set { teamId = value; }
        }
        */

        [DataMember]
        public int columnNumber
        {
            get { return column; }
            set { column = value; }
        }

        [DataMember]
        public int winLossCode0
        {
            get { return score0; }
            set { score0 = value; }
        }

        [DataMember]
        public int winLossCode1
        {
            get { return score1; }
            set { score1 = value; }
        }

        [DataMember]
        public int winLossCode2
        {
            get { return score2; }
            set { score2 = value; }
        }

        [DataMember]
        public int winLossCode3
        {
            get { return score3; }
            set { score3 = value; }
        }

        [DataMember]
        public int winLossCode4
        {
            get { return score4; }
            set { score4 = value; }
        }

        [DataMember]
        public int winLossCode5
        {
            get { return score5; }
            set { score5 = value; }
        }

        [DataMember]
        public int winLossCode6
        {
            get { return score6; }
            set { score6 = value; }
        }

        [DataMember]
        public int winLossCode7
        {
            get { return score7; }
            set { score7 = value; }
        }

        [DataMember]
        public int winLossCode8
        {
            get { return score8; }
            set { score8 = value; }
        }

        [DataMember]
        public int winLossCode9
        {
            get { return score9; }
            set { score9 = value; }
        }

        [DataMember]
        public int winLossCode10
        {
            get { return score10; }
            set { score10 = value; }
        }

        [DataMember]
        public int winLossCode11
        {
            get { return score11; }
            set { score11 = value; }
        }

        [DataMember]
        public int winLossCode12
        {
            get { return score12; }
            set { score12 = value; }
        }

        [DataMember]
        public int winLossCode13
        {
            get { return score13; }
            set { score13 = value; }
        }

        [DataMember]
        public int winLossCode14
        {
            get { return score14; }
            set { score14 = value; }
        }

        [DataMember]
        public int winLossCode15
        {
            get { return score15; }
            set { score15 = value; }
        }

        [DataMember]
        public int winLossCode16
        {
            get { return score16; }
            set { score16 = value; }
        }


    }

    [DataContract]
    public class serviceUser
    {
        string firstName = "";
        string lastName = "";
        string email = "";
        string password = "";
        bool loggedin = false;

        string selectedTeam0Name ="";
        string selectedTeam1Name ="";
        string selectedTeam2Name ="";
        string selectedTeam3Name ="";
        string selectedTeam4Name ="";
        string selectedTeam5Name ="";
        string selectedTeam6Name ="";


        [DataMember]
        public string FirstName
        {
            get { return firstName; }
            set { firstName = value; }
        }

        [DataMember]
        public string LastName
        {
            get { return lastName; }
            set { lastName = value; }
        }

        [DataMember]
        public string Email
        {
            get { return email; }
            set { email = value; }
        }

        [DataMember]
        public string Password
        {
            get { return password; }
            set { password = value; }
        }

        [DataMember]
        public bool loggedIn
        {
            get { return loggedin; }
            set { loggedin = value; }
        }
        
        [DataMember]
        public string SelectedTeam0Name
        {
            get { return selectedTeam0Name; }
            set { selectedTeam0Name = value; }
        }

        [DataMember]
        public string SelectedTeam1Name
        {
            get { return selectedTeam1Name; }
            set { selectedTeam1Name = value; }
        }

        [DataMember]
        public string SelectedTeam2Name
        {
            get { return selectedTeam2Name; }
            set { selectedTeam2Name = value; }
        }

        [DataMember]
        public string SelectedTeam3Name
        {
            get { return selectedTeam3Name; }
            set { selectedTeam3Name = value; }
        }

        [DataMember]
        public string SelectedTeam4Name
        {
            get { return selectedTeam4Name; }
            set { selectedTeam4Name = value; }
        }

        [DataMember]
        public string SelectedTeam5Name
        {
            get { return selectedTeam5Name; }
            set { selectedTeam5Name = value; }
        }

        [DataMember]
        public string SelectedTeam6Name
        {
            get { return selectedTeam6Name; }
            set { selectedTeam6Name = value; }
        }

    }


}
